home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / fastmap.zip / FASTMAP.DOC < prev    next >
Text File  |  1993-04-01  |  42KB  |  839 lines

  1.         FASTMAP DOCUMENTATION 
  2.  
  3.         by David Curtis 
  4.  
  5.         
  6.         FASTMAP implements an algorithm to provide an approximate 
  7.         multipoint lod score for a disease against a number of markers 
  8.         from supplied two point lod scores. At time of writing this 
  9.         algorithm has been accepted for publication in Human Heredity 
  10.         (Curtis D & Gurling HMD. A procedure for combining two-point lod 
  11.         scores into a summary multipoint map.  Human Heredity 1993; 43; 
  12.         173-185). You should refer to this for an account of how FASTMAP 
  13.         works and an evaluation of its performance with real and 
  14.         simulated linkage data. The algorithm, program and source code 
  15.         are made freely available, though the source code may not be 
  16.         commercially exploited. However please cite this publication 
  17.         when writing up any work for which you have found FASTMAP 
  18.         useful. 
  19.  
  20.         FASTMAP takes as input two-point lod scores from a number of 
  21.         markers and as output produces a table of estimated multipoint 
  22.         lods scores, a graph file suitable for graphing these with the 
  23.         Shareware program EASIGRAF (supplied with EASISTAT) and a 
  24.         debugging file which contains additional information about the 
  25.         approximations made. The approximation is produced very quickly, 
  26.         at least in relation to the time taken to produce a full 
  27.         multipoint. Overall the approximation is unbiased and is usually 
  28.         quite accurate, although occasionally there can be be a fairly 
  29.         large difference from the true multipoint lod scores as produced 
  30.         for example by LINKMAP.
  31.  
  32.         The version currently distributed may be regarded to some extent 
  33.         as a prototype, although I think I have now got it working about 
  34.         as well as I am going to. I would be extremely interested to 
  35.         hear any comments concerning it performance. I also hope that 
  36.         others better qualified than myself may be able to develop the 
  37.         basic algorithm further and I would be glad to assist anyone in 
  38.         explaining how the program is supposed to work. This 
  39.         documentation contains some additional notes about the 
  40.         implementation which were not included in the article submitted 
  41.         for publication. Also included with these files are some more 
  42.         detailed breakdowns of FASTMAP's performance in different 
  43.         simulations, contained in the file FMAPEVAL.DOC.
  44.  
  45.         
  46.         COPYRIGHT
  47.  
  48.         I hold the copyright to the source code. I hereby authorise 
  49.         anyone to use, make adjustments to and redistribute this source 
  50.         code provided only that they do not do so for profit and that my 
  51.         original contribution is ackowledged, and that any alterations 
  52.         from the original are clearly marked. Anyone who wishes to 
  53.         distribute the code or programs compiled from it for profit may 
  54.         only do so with prior agreement from me. However the algorithm 
  55.         and ideas embodied in the source code may be freely used by 
  56.         anybody for any purpose. Naturally I would hope that such a 
  57.         person would acknowledge my contribution, and in particular I 
  58.         would urge anyone who finds the procedure helpful to cite the 
  59.         relevant reference. I would also be grateful if anyone who did 
  60.         come up with any useful improvements might keep me informed of 
  61.         them, although I would be very happy to see others take over 
  62.         development of this idea. 
  63.  
  64.         
  65.         PROGRAM INPUT 
  66.  
  67.         Input is either from the keyboard (standard input which may be 
  68.         redirected) or from an input file specified on the command 
  69.         line, e.g.: 
  70.  
  71.         fastmap 
  72.         
  73.         (then input is typed in interactively)
  74.  
  75.         or:
  76.  
  77.         fastmap < input.dat 
  78.  
  79.         or:
  80.  
  81.         fastmap input.dat 
  82.                 
  83.         When input is from standard input the program prompts the user 
  84.         for the required values, but the format of the input is 
  85.         identical regardless of whether it is from the keyboard or a 
  86.         file. 
  87.  
  88.         Line 1: 
  89.  
  90.         One to three filenames. The first is for the tabulated output 
  91.         file of lod score[s] at each map position. The second filename 
  92.         if specified is a graph file for input into the EASIGRAF 
  93.         program. The third filename if specified contains debugging 
  94.         information which reports various aspects of the estimates
  95.         obtained by the program. 
  96.  
  97.         Line 2: 
  98.  
  99.         Values for the minimum and maximum distances (in centimorgans) 
  100.         of the map over which lod scores are to be calculated. If in 
  101.         the next line a number of fixed distances are given, then the 
  102.         only effect of these two values is to define the horizontal 
  103.         scaling of the graph. 
  104.  
  105.         Line 3: 
  106.  
  107.         Either: one number, which consists of the number of equidistant 
  108.         points at which the lod score is to be evaluated between the 
  109.         minimum and maximum distance given above. Or: several values 
  110.         giving specific distances (in centimorgans) at which the lod 
  111.         score is to be evaluated. 
  112.  
  113.         Line 4: 
  114.  
  115.         The number of pedigrees for which data will be input. If only 
  116.         total lod scores are available then enter 1 here. However 
  117.         FASTMAP should perform better if the individual lod scores are 
  118.         available for each pedigree. You can get these from MLINK by 
  119.         setting byfamily to true and then recompiling.
  120.  
  121.         Line 5: 
  122.  
  123.         The name of the disease locus (up to 20 characters), followed 
  124.         optionally by values for the "reliability" with which genotype 
  125.         predicts phenotype. If no value for reliability is input then 
  126.         the program will choose best-fitting values for each pedigree. 
  127.         If one value is input then this value will be used for every 
  128.         pedigree. Alternatively, a number of values equal to the number 
  129.         of pedigrees may be input, in which case each pedigree can be 
  130.         assigned a different value. 
  131.  
  132.         There then follows for each marker (which should be entered in 
  133.         the order they appear on the map): 
  134.  
  135.         One line: 
  136.  
  137.         The name of the marker (up to 20 characters), followed by one 
  138.         value giving the position of the marker on the map (in 
  139.         centimorgans) followed by either one value giving the 
  140.         probability that the marker will be informative for a given 
  141.         meiosis, or alternatively a number of allele frequencies (which 
  142.         should sum to 1) from which a conventional PIC value is 
  143.         calculated by the program. 
  144.  
  145.         Second and subsequent lines (one for each pedigree): 
  146.  
  147.         A number of pairs of values for recombination fraction (in 
  148.         ascending order) and observed two-point lod score. To indicate 
  149.         that a marker was uninformative this line should consist of two 
  150.         zeros (separated by a space). If the marker was not tested in a 
  151.         particular pedigree this should be indicated by leaving the 
  152.         line completely blank. 
  153.  
  154.         Input finishes when the end of file is reached, or when a blank 
  155.         line is encountered instead of a line describing the next 
  156.         marker. Information pertaining to each marker must be entered 
  157.         in the order in which the markers appear along the map - the 
  158.         markers must be in order of ascending distance.
  159.  
  160.  
  161.         PROGRAM CONSTANTS:
  162.  
  163.         The following constants are defined in fastmap.h:
  164.  
  165.         MAXPEDS     - the maximum number of pedigrees to be used
  166.  
  167.         MAXMARKERS  - the maximum number of markers to be used
  168.  
  169.         MAXPAIRS    - the maximum number of pairs of values for 
  170.                       recombination fraction/lod score to be entered on 
  171.                       each line 
  172.  
  173.         MAXDISTS    - the maximum number of specified distances at 
  174.                       which the lod score can be evaluated (this has no 
  175.                       effect on the number of equidistant points 
  176.                       between the minimum and maximum if that option is 
  177.                       chosen instead) 
  178.  
  179.         MINFRACTION - value specifying fraction of information from 
  180.                       a given marker which can be discarded, and 
  181.                       fractional overlap between markers which can be 
  182.                       ignored
  183.  
  184.         If desired these constants can be altered and the program 
  185.         recompiled.
  186.  
  187.         
  188.         NOTES ABOUT INPUT
  189.         
  190.         1. Reliability values
  191.  
  192.         The "reliability" value is the probability of observing the 
  193.         "expected" phenotype for a given genotype in one offspring of 
  194.         an informative phase known meiosis - the combined probability 
  195.         of the offspring not being a nonpenetrant carrier nor a 
  196.         phenocopy. It can take values between 0.5 and 1. In the context 
  197.         of the complex pedigree from which the two-point lod scores are 
  198.         obtained, it provides some measure of the extent to which the 
  199.         disease genotype is known for each individual, given all the 
  200.         phenotypic information in the pedigree. In a large complex 
  201.         pedigree, this reliability value may be relatively high despite 
  202.         penetrance values being low or phenocopy rates high. This is 
  203.         because there can often be a fairly high degree of certainty of 
  204.         an individual's genotype, for example because of the pattern of 
  205.         illness in his children. 
  206.  
  207.         The effect of different reliability values is to alter the 
  208.         sharpness of curvature of graph of expected lod score against 
  209.         recombination fraction. High values produce more sharply peaked 
  210.         curves which (if there are any apparent recombinants) go down 
  211.         to minus infinity at zero recombination, lower values produce 
  212.         flattened out curves.
  213.  
  214.         If a reliability value is not specified for a pedigree, FASTMAP 
  215.         will find the value which gives the best fit to the input lod 
  216.         score values for all the markers. (Note that reliability values 
  217.         can only be fitted if at least one marker contains more than 
  218.         two pairs of recombination fraction/lod score values, otherwise 
  219.         a reliability value of 1 will be chosen.) If you are dealing 
  220.         with an incompletely penetrant disease or one with phenocopies 
  221.         you should begin by letting FASTMAP generate fitted values for 
  222.         the reliability. Such a fitted value is constrained to lie 
  223.         between 0.51 and 0.99. If you are dealing with a fully-
  224.         penetrant trait then you may wish to specify a reliability of 
  225.         1. 
  226.  
  227.         Fitting the reliability values takes a considerable amount of 
  228.         time compared to the rest of the procedure. FASTMAP outputs the 
  229.         values that it has chosen, and if you find that with different 
  230.         markers the same pedigree always produces about the same 
  231.         reliability value then you can save time by specifying this 
  232.         value in the input file. If every pedigree has the same value 
  233.         then you can just specify one value instead of one for each 
  234.         pedigree. I find that with moderately complex pedigrees a value 
  235.         of 0.99 is appropriate even when dealing with a disease with 
  236.         fairly low penetrance.
  237.  
  238.  
  239.         2. PIC values, etc
  240.  
  241.         Normally, for each marker FASTMAP calculates a conventional PIC 
  242.         value from input allele frequencies. This is supposed to 
  243.         provide a value for the proportion of meioses informative for 
  244.         the disease locus which can be expected to be also informative 
  245.         for the marker. However the user does have the option of 
  246.         entering this probability directly, and there are probably two 
  247.         circumstances when you may wish to do this.
  248.  
  249.         The first case in which this is desirable is when the two-point 
  250.         lod score has been derived from more than one allelic system. 
  251.         If there are two polymorphic systems at the same locus, or very 
  252.         close to each other, then it may be preferable to calculate 
  253.         two-point lod scores with them jointly (e.g. with MLINK) rather 
  254.         than to enter the results separately into FASTMAP. In this case 
  255.         a joint PIC value should be calculated, for the probability 
  256.         that at least one system will be informative at a given locus. 
  257.         This is PIC=1-(1-PIC1)*(1-PIC2). (The PIC values can be 
  258.         obtained by inspection of the debugging file after the 
  259.         individual markers have been entered with their allele 
  260.         frequencies.)
  261.  
  262.         The second case when one might want to consider not using the 
  263.         conventional PIC is to my mind much more dubious, and is when 
  264.         dealing with a recessive disease. It is true that for certain types 
  265.         of mating the PIC value does not give the true probability for 
  266.         a meiosis to be informative. For example if two parents who are 
  267.         carriers of a recessive disease have the same genotype and are 
  268.         heterozygotes, and if the disease is known to be in phase with 
  269.         the same marker allele in each parent, then if the child is 
  270.         affected but is heterozygous for the marker we can conclude 
  271.         that there has been one recombinant and one nonrecombinant 
  272.         meiosis. However for a dominant disease we would not be able to 
  273.         conclude anything from the situation of two such heterozygote 
  274.         parents (one affected) producing a heterozygote child. There is 
  275.         thus a case for using a slightly higher value than the 
  276.         conventional PIC when dealing with recessive diseases. However 
  277.         the difference from the conventional PIC is small. It is 
  278.         maximal for a two-allele system with equal allele frequencies, 
  279.         when I calculate that the proportion of matings between to 
  280.         carriers producing affected offspring which are informative is 
  281.         0.469, compared with a conventional PIC of 0.375. However when 
  282.         dealing with a complex pedigree information will additionally 
  283.         be obtained from other types of matings for which the ordinary 
  284.         PIC is probably more appropriate. I would conclude that the 
  285.         size of the effect is likely to be negligible in practice. 
  286.         This view is to some extent supported by the simulations 
  287.         carried out with a recessive disease, which used conventional 
  288.         PIC values but demonstrated performance which was overall at 
  289.         least as good as for a dominant disease. Nevertheless, the 
  290.         option to enter values other than the PIC is available to the 
  291.         user if desired.
  292.         
  293.         3. Recombination fractions and lod scores
  294.  
  295.         FASTMAP fits a number of recombinant and nonrecombinant meioses 
  296.         to the observed two-point lod scores, and may fit a reliability 
  297.         value as well. There are three distinct ways in which this 
  298.         fitting is accomplished, depending on the number of pairs of 
  299.         values which are entered for recombination fraction and lod 
  300.         score.
  301.  
  302.         If only one pair of values is entered then this is taken to be 
  303.         for the recombination fraction at which the maximum lod score 
  304.         is obtained. An exact number of recombinant and nonrecombinat 
  305.         meioses which would produce this maximum lod can readily be 
  306.         calculated, contingent on a reliability value. It is only 
  307.         possible to use this form of input if there is an available lod 
  308.         score at some recombination fraction which is positive. In 
  309.         addition it is not possible to fit a reliability value which 
  310.         depends on the curvature of the lod score graph. 
  311.  
  312.         If two pairs of values are entered then again it is possible to 
  313.         find an exact solution which would produce a lod score curve 
  314.         going through these two points. Again the solution is 
  315.         contingent on the reliability value specified, which cannot be 
  316.         fitted. This option can be used even when the lod scores are 
  317.         all negative. However I would advise against only entering two 
  318.         pairs of values. The reason is that the shape of the actual and 
  319.         fitted curves may not be exactly the same, and it is easy to 
  320.         imagine that producing a solution which passes exactly through 
  321.         the two points specified may be wildly inaccurate at other 
  322.         recombination fractions. 
  323.  
  324.         When more than two pairs of values are entered, numbers of 
  325.         meioses are chosen to produce a line which most closely 
  326.         approximates to the points specified. This closeness is in the 
  327.         sense that the sum of squares distance between points on the 
  328.         line and observed lod score values is minimised. In this 
  329.         situation a reliability value can be fitted as well as the 
  330.         number of recombinant and nonrecombinant meioses. Because of 
  331.         the way the closeness of fit is measured, it is possible to 
  332.         bias the fitting to give more priority to some recombination 
  333.         fractions than others. For example if many pairs of values at 
  334.         small recombination fractions were entered then more atttention 
  335.         would be paid to getting the line to fit well at small 
  336.         recombination fractions than large ones. Actually, since lod 
  337.         scores at large recombination fractions are relatively small 
  338.         anyway, it is the lod scores at smaller recombination fractions 
  339.         which generally have more effect on the values eventually 
  340.         arrived at. Lod scores at very small recombination fractions can 
  341.         be very large indeed, so you are (strongly) advised to omit 
  342.         these (e.g. at recombination fractions less than 0.01).
  343.  
  344.         To summarise, my advice for the information to input would be a 
  345.         series of lod score values at different recombination fractions 
  346.         ranging from 0.01 to 0.4. FASTMAP was evaluated using lod scores 
  347.         at 0.01, 0.05, 0.1, 0.2, 0.3 and 0.4 and this gave satisfactory 
  348.         results. If three or more pairs of values are given for at 
  349.         least one of the markers then this allows a reliability value 
  350.         to be fitted to the shape of the curve. Avoid entering strongly 
  351.         negative values at very low recombination fractions to avoid 
  352.         distorting the fitted curve too wildly (the price of this is 
  353.         that the estimate may be inaccurate very close to the marker 
  354.         positions, but this is unavoidable).
  355.  
  356.         EXAMPLE INPUT FILE:
  357.  
  358. UPM6DF.OUT UPM6DF.GRP UPM6DF.DBG
  359. -20 60 
  360. 100 
  361. UP 
  362. MS5H 0 .2 .2 .2 .2 .2
  363. 0.010 -0.9811  0.050 -0.5865  0.100 -0.3641  0.200 -0.1526  0.300 -0.0566  0.400 -0.0127  
  364. 0.010 -2.8312  0.050 -1.9729  0.100 -1.4685  0.200 -0.8191  0.300 -0.4055  0.400 -0.1670  
  365. 0.010 -2.4945  0.050 -1.7574  0.100 -1.1036  0.200 -0.3999  0.300 -0.1076  0.400 -0.0125  
  366. L6-3 21.2 .43 .57
  367. 0.010 -0.0902  0.050 -0.0747  0.100 -0.0579  0.200 -0.0316  0.300 -0.0138  0.400 -0.0034  
  368. 0.010 -1.5290  0.050 -0.9314  0.100 -0.6415  0.200 -0.3675  0.300 -0.2186  0.400 -0.1029  
  369. 0.010  0.0000  0.050  0.0000  0.100  0.0000  0.200  0.0000  0.300  0.0000  0.400  0.0000  
  370. HD2G 42.4 .24 .76
  371. 0.010 -0.0007  0.050 -0.0006  0.100 -0.0005  0.200 -0.0003  0.300 -0.0001  0.400 -0.0000  
  372. 0.010 -2.3743  0.050 -1.4876  0.100 -0.9106  0.200 -0.3696  0.300 -0.1342  0.400 -0.0296  
  373. 0.010 -0.8302  0.050 -0.7315  0.100 -0.4721  0.200 -0.0962  0.300  0.0329  0.400  0.0282  
  374.  
  375.         OUTPUT FILES
  376.  
  377.         FASTMAP produces up to three output files with the names 
  378.         specified on the first line of the input file. 
  379.         
  380.         1. Table output
  381.  
  382.         The first file ouptut is a simple table of distance against lod 
  383.         score - total lod score and a breakdown by pedigree. Because the 
  384.         lod score may be evaluated at large number of positions (100 in 
  385.         the example above) the pedigrees are arranged in columns, rather 
  386.         than rows as might seem more natural. 
  387.  
  388.         2. Graph file output
  389.  
  390.         The second file, if specified, is a graph file for input into 
  391.         EASIGRAF, a Shareware graphing program supplied with the 
  392.         EASISTAT package (obtainable from me or the same source as you 
  393.         acquired FASTMAP). This displays a graph of lod score against 
  394.         distance - again both the total lod score and for each pedigree. 
  395.         A neat feature is that it also displays each marker on the same 
  396.         graph. It is run by specifying the name of the graph file on the 
  397.         command line, e.g.:
  398.  
  399.         EASIGRAF filename.grp
  400.         
  401.         Please consult the EASISTAT documentation for details on 
  402.         how various aspects of the display may be altered. Essentially, 
  403.         you can use the "Axes" menu to control aspects of the labelling 
  404.         and scaling of the X and Y axes, and the "Data" menu to control 
  405.         which columns are displayed from the graph file (the first 
  406.         column corresponds to map distance, the second to total lod and 
  407.         subsequent columns for each pedigree's lod score). If you wish 
  408.         to only display the total lod score this can be done by pressing 
  409.         D for the "Data" menu, then pressing 5 to select select XY 
  410.         columns, then entering 1,2 to graph the second column against 
  411.         the first. Then keep pressing Enter to return to the main menu.
  412.  
  413.         There are a couple of points worth mentioning specifically. The 
  414.         marker labels are implemented as "floating titles" for EASIGRAF, 
  415.         which means they always appear in the same position on the 
  416.         screen. This means that if you change the horizontal scale of 
  417.         the graph the marker labels will no longer be in the correct 
  418.         position (you can change the vertical scale with no problems). 
  419.         
  420.         When the graph file is first read in by EASIGRAF the horizontal 
  421.         scale is determined by the minimum and maximum distances which 
  422.         were entered to FASTMAP on line 2 of the input file. If the data 
  423.         is regraphed (for instance if you use the "Data" menu to graph 
  424.         just the total lod score against distance, columns 1 and 2 of 
  425.         the graph file) then the graph will be rescaled. The new minimum 
  426.         and maximum distances will then be determined by the smallest 
  427.         and largest distances for which a lod score was calculated. If 
  428.         you selected the option to calculate scores at equidistant 
  429.         points between the minimum and maximum, then the scale of the 
  430.         graph will be unchanged. However if lod scores were only 
  431.         calculated for specific points then the smallest and largest of 
  432.         these distances will determine the new scale and the floating 
  433.         titles may appear in the wrong place. If you wish to change the 
  434.         horizontal scaling of the graph, the best way to do it is to run 
  435.         FASTMAP again with different minimum and maximum distances 
  436.         specified, otherwise the floating titles for the markers will 
  437.         appear in the wrong place. 
  438.  
  439.         Another point about the marker labels is that if the markers are 
  440.         close together then the labels may overwrite each other. To fix 
  441.         this just alter the vertical position of the relevant floating 
  442.         title. Select "Edit titles" from the "Titles" menu, then select 
  443.         "Edit TITLEF's". Go through pressing Enter till you get to the 
  444.         desired label. Leave the text unchanged, but backspace and 
  445.         change the Y value for the position (e.g. from 0.0 to 0.1) and 
  446.         retype the rotation to 90. Then press Enter and Escape 
  447.         appropriately to return to the main menu. The marker label will 
  448.         be moved up a but, clear of the other labels. the 
  449.          
  450.         3. Debug file
  451.  
  452.         The output from this is fairly complex, and should be studied in 
  453.         conjunction with the source code and description of the 
  454.         algorithm. A detailed description of its contents is given later 
  455.         in the documentation.
  456.  
  457.  
  458.         USING FASTMAP IN PRACTICE
  459.  
  460.         Supplied with these files is a utility program called TABLE 
  461.         which produces the pairs of recombination fractions and lod 
  462.         scores needed to input to FASTMAP. It is run on the output of 
  463.         MLINK, although it does assume that the output from each two-
  464.         point analysis will be in a separate results file. To get these 
  465.         pairs TABLE is run with the /I switch, e.g.:
  466.  
  467.         TABLE filename.res /I
  468.  
  469.         This would make a new file called filename.inp containing the 
  470.         pairs of values at recombination fractions between 0.01 and 0.4.
  471.  
  472.         Of course you would still have to input the additional 
  473.         information about the number of pedigrees, etc. Still things can 
  474.         be made even easier. The setup I have is to have different files 
  475.         containing one line of information about each locus (its name, 
  476.         position and allele frequencies) in one subdirectory. So there 
  477.         might be a file called F13A.INP with the following contents:
  478.  
  479.         F13A -50 .2 .2 .2 .2 .2
  480.  
  481.         (You do have to be careful that the file has one and only one 
  482.         line feed at the end of it, otherwise you would get extraneous 
  483.         blank lines in your input file to FASTMAP.)
  484.  
  485.         Then one can have a couple of simple batch files along the lines 
  486.         of: 
  487.  
  488.             SETUPINP.BAT
  489.                     
  490.             echo %1.out %1.grp >%1.inp
  491.             echo %2 %3 >>%1.inp
  492.             echo %4 >>%1.inp
  493.             echo %5 >>%1.inp
  494.             echo %6 %7 >>%1.inp
  495.         
  496.         and:
  497.  
  498.             ADDINP.BAT
  499.  
  500.             type d:\ls4\%2.inp >>%1.inp
  501.             table %3.res /i
  502.             type %3.inp >> %1.inp
  503.         
  504.         These assume that the one line files for each locus are in the 
  505.         directory D:\LS4.
  506.  
  507.         Then a batch file which will take all the relevant two-point 
  508.         results files, prepare them to make an input file for FASTMAP 
  509.         and run FASTMAP could look like this:
  510.  
  511.             DOFAST6.BAT
  512.  
  513.             CALL SETUPINP EPHDALL -80 60 100 25 EPHD 
  514.             CALL ADDINP EPHDALL F13A EPHDF13A
  515.             CALL ADDINP EPHDALL 6S89 EPHD6S89
  516.             CALL ADDINP EPHDALL 6109 EPHDF109
  517.             CALL ADDINP EPHDALL 6105 EPHDF105
  518.             CALL ADDINP EPHDALL 6S10 EPHD6S10
  519.             CALL ADDINP EPHDALL C4 EPHDC4
  520.             CALL ADDINP EPHDALL DQA EPHDDQA
  521.             CALL ADDINP EPHDALL TCTE EPHDTCTE
  522.  
  523.             FASTMAP EPHDALL.INP
  524.  
  525.  
  526.         The call to SETUPINP.BAT produces the first few lines 
  527.         EPHDALL.INP, with no "reliability" value specified. The 
  528.         following lines, call ADDINP.BAT for each marker uses it to take 
  529.         the one line locus description in D:\LS4\F13A.INP etc. and add 
  530.         it to EPHDALL.INP, then run table on EPHDF13A.RES etc. and add 
  531.         e.g. EPHDF13A.INP onto EPHDALL.INP. Finally FASTMAP is run with 
  532.         EPHDALL.INP as input. 
  533.  
  534.         Of course you don't have to go to these lengths, but as you grow 
  535.         more familiar with FASTMAP you might like to bear these examples 
  536.         in mind.
  537.  
  538.         
  539.         PROBLEMS WITH FASTMAP
  540.  
  541.         If FASTMAP seems to be producing poor approximations to be 
  542.         performing poorly, there are a number of things you may want to 
  543.         look at. Certainly it may be helpful to examine the debugging 
  544.         file to see if any information gives a clue as to what may be 
  545.         happening. You can check how good FASTMAP is at fitting to the 
  546.         supplied two-point data by only inputting the data for one 
  547.         marker at a time and checking to see how closely the output 
  548.         corresponds to the input. If you have supplied a "reliability" 
  549.         value then it would be worth removing this and letting FASTMAP 
  550.         fit to the supplied lod score values with the reliability 
  551.         uconstrained. Make sure that whenever possible you enter 
  552.         information by pedigree, rather than as total lod scores summed 
  553.         over all pedigrees. However there are some occasions when FASTMAP 
  554.         will not produce a very good approximation, for example if there 
  555.         just happens to be an unexpectedly large number of 
  556.         recombinations between markers, or if two markers just happen to 
  557.         be informative for all the same matings, and so on. I would be 
  558.         interested to see examples of such bad performance, to see if 
  559.         there are any further improvements which could be made. 
  560.         
  561.         
  562.         DETAILED CONTENTS OF DEBUG FILE
  563.  
  564.         It contains the following information:
  565.  
  566.         For each marker, the proportion of meioses for which it is 
  567.         expected to be informative. (This may either be input directly 
  568.         by the user, or is the PIC value calculated from the allele 
  569.         frequencies supplied instead.)
  570.  
  571.         All the following information is repeated once for each 
  572.         pedigree.
  573.  
  574.         The reliability value is output, which may be supplied by the 
  575.         user or fitted by the program.
  576.  
  577.         For each marker the estimated equivalent number of recombinant 
  578.         and nonrecombinant meioses that would produce lod scores close 
  579.         to those observed is output.
  580.  
  581.         The total estimated number of meioses informative for the 
  582.         disease locus is output (based on the estimated number of 
  583.         informative meioses for each marker and the probability of each 
  584.         marker being informative). 
  585.  
  586.         For each marker, based on this total, the fraction of meioses 
  587.         for which that marker is deemed to be actually informative.
  588.  
  589.         The following information is repeated once for every interval on 
  590.         the map. Information pertaining to each marker to the right of 
  591.         the disease locus goes into one column, and each to the left in 
  592.         a row. The information consists of the number of recombinant 
  593.         meioses which are expected to be informative for a given marker, 
  594.         and for no other marker between it and the disease locus. 
  595.         
  596.         The top row and leftmost column are for the meioses which are 
  597.         only informative for a marker in the right group or in the left 
  598.         group (but not both). In the top row the number of 
  599.         nonrecombinants with the each right hand marker is printed just 
  600.         above and to the left of the number of recombinants. In the left 
  601.         most column the numbers of nonrecombinants with the each marker 
  602.         is two lines above the number of recombinants. 
  603.         
  604.         The first set of values, which concerns the first interval, will 
  605.         all be in one row. The first pair of numbers is the estimated 
  606.         number of nonrecombinants and recombinants for the first marker. 
  607.         The second pair relates to the second marker, but excludes those 
  608.         meioses for which the first marker is expected to have already 
  609.         been informative, and so on. 
  610.  
  611.         Reading down each column and along each row into the table one 
  612.         can see the meioses which are expected to informative for a 
  613.         marker in the lefthand group and in the righthand group 
  614.         simultaneously. These meioses are categorised as to whether they 
  615.         are nonrecombinant or recombinant for each marker. Here is an 
  616.         example debug file containing information about 1 pedigree and 3 
  617.         markers:
  618.  
  619. DQA.prob_inf=0.600000
  620. C4.prob_inf=0.600000
  621. 6S10.prob_inf=0.600000
  622. ped   1, "reliability" = 0.990:
  623. DQA:  0.837 nonrec,  0.000 rec
  624. C4:  0.837 nonrec,  0.000 rec
  625. D6S10:  0.000 nonrec,  1.599 rec
  626.  
  627. Estimated total informative meioses for ped   1: 1.914425
  628. DQA.fraction_used: 0.437224
  629. C4.fraction_used: 0.437224
  630. D6S10.fraction_used: 0.835266
  631.  
  632.  
  633.  
  634.             0.837     0.471     0.000  
  635.               0.000     0.000     0.597
  636.  
  637.  
  638.             0.471     0.000  
  639.               0.000     1.006
  640.  
  641.    0.423    0.364     0.000  
  642.               0.000     0.049
  643.    0.000    0.000     0.000  
  644.               0.000     0.000
  645.  
  646.  
  647.             0.000  
  648.               1.006
  649.  
  650.    0.294    0.000  
  651.               0.543
  652.    0.000    0.000  
  653.               0.000
  654.  
  655.    0.421    0.000  
  656.               0.048
  657.    0.000    0.000  
  658.               0.000
  659.  
  660.  
  661.          
  662.          
  663.  
  664.    0.000 
  665.          
  666.    1.599 
  667.          
  668.  
  669.    0.294 
  670.          
  671.    0.000 
  672.          
  673.  
  674.    0.000 
  675.          
  676.    0.000 
  677.          
  678.         The first three lines say that each marker had a probability of 
  679.         0.6 of being informative (this information had been entered 
  680.         directly). The "reliability" value was set to be 0.99. From the  
  681.         observed lod scores, the estimated equivalent numbers of meioses 
  682.         were 0.837 nonrecombinants with no recombinants for the first 
  683.         two markers, and 1.599 recombinants with no nonrecombinant 
  684.         meioses for the third. The estimated total number of potentially 
  685.         informative meioses in the whole pedigree was 1.91, yielding the 
  686.         stated values for the fractions for which each marker actually 
  687.         was informative. (So the third marker, with a higher estimated 
  688.         total number of meioses, turned out to be slightly more 
  689.         informative than expected, while the first two were slightly 
  690.         less.)
  691.         
  692.         The first row shows the likely distribution of these meioses. 
  693.         The first marker has 0.837 nonrecombinants. The second marker 
  694.         has 0.471 remaining from its original 0.837 once we have 
  695.         excluded the ones for which the first was informative. By the 
  696.         time we get to the third marker there remain 0.597 of its 
  697.         recombinant meioses for which neither of the first two were 
  698.         informative. (We expect that some of the meioses which were 
  699.         nonrecombinant at the position of the first and/or second 
  700.         markers may have become recombinant by the time we get to the 
  701.         third. Incidentally, although the distances are not shown in the 
  702.         debugging file there is a recombination fraction of 0.01 between 
  703.         the first two markers and 0.04 between the second and third.)
  704.  
  705.         Now we move on to the next interval. Here we see that there are 
  706.         0.364 for which the first two markers are both nonrecombinant. 
  707.         The first marker is now in the leftmost group. There are another 
  708.         0.049 meioses for which it is nonrecombinant and the third 
  709.         marker is recombinant, and there are 0.423 meioses for which it 
  710.         is nonrecombinant and no other marker is informative. The third 
  711.         marker is also recombinant for 1.006 meioses which are not 
  712.         informative for either of the first two.
  713.  
  714.         In the next interval we again see the 1.006 recombinant meioses 
  715.         for which only the third marker is informative. There are 0.543 
  716.         meioses for which it is recombinant and the second marker is 
  717.         nonrecombinant, and another 0.048 for which the first marker is 
  718.         nonrecombinant. There are 0.294 meioses for which the second 
  719.         marker is nonrecombinant and the third uninformative. There are 
  720.         0.421 meioses for which the first marker is nonrecombinant and both 
  721.         the others noninformative.
  722.  
  723.         In the final interval all markers are now in the lefthand group. 
  724.         We begin with the third marker which has 1.599 recombinant 
  725.         meioses. Excluding these, there remain 0.294 meioses which are 
  726.         nonrecombinant for the second marker. On this occasion we 
  727.         estimate that there are no meioses which are informative for the 
  728.         first marker and neither of the others. 
  729.  
  730.  
  731.         NOTES ABOUT IMPLEMENTATION
  732.  
  733.         FASTMAP.EXE is a DOS executable which should run on any IBM PC 
  734.         compatible running MSDOS. If a maths coprocessor is present it 
  735.         will speed up calculations, but it is not required. I have been 
  736.         running it on a 486 which gives good performance - estimated 
  737.         multipoints using 25 pedigrees and 8 markers with reliability 
  738.         values to be fitted by the program were produced in 70 seconds.
  739.         The Sun SPARCServer I have access to produced the same results 
  740.         in 13 seconds. 
  741.  
  742.         The file FASTMAP.C is supplied and should compile OK on most 
  743.         compilers with little if any modification. I have compiled it 
  744.         with the Zortech DOS compiler and on a Sun. If you compile it on 
  745.         a DOS machine you may want to ensure that a large stack is 
  746.         provided, and you should use a large memory model so there is 
  747.         room for the data tables. 
  748.  
  749.         FASTMAP.H begins with a few #defines to control compilation. You 
  750.         may want to modify these for your own compiler. The issues are 
  751.         whether the compiler can accept ANSI C/C++ style prototypes, 
  752.         whether it can use enums (this is pretty unimportant), and where 
  753.         to find a prototype for calloc (mine is in stdlib.h). There may 
  754.         be also be compiler specific ways to modify the stack size, and 
  755.         with the Zortech compiler this is accomplished with the 
  756.         _stack=30000 statement. Some libraries contain the function 
  757.         index() instead of strchr(). Both do the same thing, so you may 
  758.         need to use the "#define strchr index" statement. 
  759.  
  760.         As well as declaring functions and variables, the header file 
  761.         defines a few program constants (listed above) which can be 
  762.         changed if desired.
  763.  
  764.         A general point about coding style is that I have tended to keep 
  765.         a fair amount of information in structures, which are passed to 
  766.         functions either by value or reference. This largely reflects my 
  767.         exposure to C++ and an attempt to make the code somewhat object-
  768.         orientated. This and other factors may mean that the code is not 
  769.         as efficient as it could be, but on the other hand it should 
  770.         make it easier to modify if improvements can be found for the 
  771.         basic algorithm. Another slight inefficiency may be the liberal 
  772.         use of doubles rather than floats. A major reason for this is 
  773.         that I have used the old-fashioned argument-passing style so 
  774.         that the code will be compatible with K & R compilers. However 
  775.         ANSI compilers will then report errors if arguments are declared 
  776.         as floats (what happens is that the all float arguments are 
  777.         passed as doubles and that ANSI compilers will not make the 
  778.         automatic cast back to float when this style of argument-passing 
  779.         is used). Since using doubles does not actually incur a 
  780.         prohibitive overhead, I have tended to use them throughout to 
  781.         avoid having to worry about this problem.
  782.         
  783.         I have now commented the code fairly comprehensively, and I hope 
  784.         that in conjunction with the paper it should be possible to work 
  785.         out what is going on. 
  786.  
  787.  
  788.         AVAILABILITY
  789.  
  790.         FASTMAP is available directly from me on receipt of a formatted 
  791.         floppy disk. However I would prefer people to obtain it from one 
  792.         of the software libraries on Internet listed below. The EASISTAT 
  793.         package is available from the same sources, but requires another 
  794.         720 K of disk space, so if you wish to obtain it from me then 
  795.         please enclose the appropriate number of extra formatted disks.
  796.  
  797.         gene-server:
  798.         Internet    gene-server@bchs.uh.edu
  799.         BITNET/
  800.         EARN        gene-server%bchs.uh.edu@CUNYVM
  801.         UUCP        gene-server@bchs.UUCP (new style)
  802.         Send mail with  Subject: SEND DOS HELP
  803.         Anonymous ftp: ftp.bchs.uh.edu
  804.         
  805.         The following are mirror sites for the above collection.
  806.  
  807.         European:
  808.         
  809.         Anonymous FTP: nic.funet.fi
  810.         E-mail: mailserver@nic.funet.fi
  811.         Send mail message: HELP
  812.  
  813.         European EMBL server:
  814.         NetServ@EMBL-Heidelberg.DE
  815.         Send mail message: DIR DOS_SOFTWARE
  816.         Anonymous ftp: ftp.embl-heidelberg.de (/pub/software/dos)
  817.         Manager: Rainer Fuchs, Fuchs@EMBL-Heidelberg.DE
  818.         Problems: NetHelp@EMBL-Heidelberg.DE
  819.  
  820.         USA anonymous FTP: ftp.bio.indiana.edu 
  821.  
  822.         Please feel very free to contact me (email preferred) with 
  823.         comments, questions, etc. I would be very interested in people's 
  824.         views on how well it performs and how useful (or not) it is. 
  825.  
  826.         Dave Curtis
  827.  
  828.         Academic Department of Psychiatry
  829.         St Mary's Hospital Medical School
  830.         Praed Street
  831.         London W2 1NY, England                   Phone:  071 725 1638
  832.  
  833.         Janet:       dcurtis@UK.AC.CRC
  834.         Elsewhere:   dcurtis@CRC.AC.UK
  835.         EARN/Bitnet: dcurtis%CRC@UKACRL
  836.         Usenet: ...!mcsun!ukc!mrccrc!D.Curtis
  837.         
  838.